3.1.72 \(\int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx\) [72]

3.1.72.1 Optimal result
3.1.72.2 Mathematica [A] (verified)
3.1.72.3 Rubi [A] (verified)
3.1.72.4 Maple [C] (warning: unable to verify)
3.1.72.5 Fricas [F]
3.1.72.6 Sympy [F]
3.1.72.7 Maxima [F]
3.1.72.8 Giac [F(-1)]
3.1.72.9 Mupad [F(-1)]

3.1.72.1 Optimal result

Integrand size = 23, antiderivative size = 216 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=-d (a+b \arctan (c x))^2+i c d x (a+b \arctan (c x))^2+2 d (a+b \arctan (c x))^2 \text {arctanh}\left (1-\frac {2}{1+i c x}\right )+2 i b d (a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )-b^2 d \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )-i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )+i b d (a+b \arctan (c x)) \operatorname {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )-\frac {1}{2} b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{1+i c x}\right )+\frac {1}{2} b^2 d \operatorname {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right ) \]

output
-d*(a+b*arctan(c*x))^2+I*c*d*x*(a+b*arctan(c*x))^2-2*d*(a+b*arctan(c*x))^2 
*arctanh(-1+2/(1+I*c*x))+2*I*b*d*(a+b*arctan(c*x))*ln(2/(1+I*c*x))-b^2*d*p 
olylog(2,1-2/(1+I*c*x))-I*b*d*(a+b*arctan(c*x))*polylog(2,1-2/(1+I*c*x))+I 
*b*d*(a+b*arctan(c*x))*polylog(2,-1+2/(1+I*c*x))-1/2*b^2*d*polylog(3,1-2/( 
1+I*c*x))+1/2*b^2*d*polylog(3,-1+2/(1+I*c*x))
 
3.1.72.2 Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 272, normalized size of antiderivative = 1.26 \[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=d \left (i a^2 c x+a^2 \log (c x)+i a b \left (2 c x \arctan (c x)-\log \left (1+c^2 x^2\right )\right )+b^2 \left (\arctan (c x) \left ((1+i c x) \arctan (c x)+2 i \log \left (1+e^{2 i \arctan (c x)}\right )\right )+\operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )\right )+i a b (\operatorname {PolyLog}(2,-i c x)-\operatorname {PolyLog}(2,i c x))+b^2 \left (-\frac {i \pi ^3}{24}+\frac {2}{3} i \arctan (c x)^3+\arctan (c x)^2 \log \left (1-e^{-2 i \arctan (c x)}\right )-\arctan (c x)^2 \log \left (1+e^{2 i \arctan (c x)}\right )+i \arctan (c x) \operatorname {PolyLog}\left (2,e^{-2 i \arctan (c x)}\right )+i \arctan (c x) \operatorname {PolyLog}\left (2,-e^{2 i \arctan (c x)}\right )+\frac {1}{2} \operatorname {PolyLog}\left (3,e^{-2 i \arctan (c x)}\right )-\frac {1}{2} \operatorname {PolyLog}\left (3,-e^{2 i \arctan (c x)}\right )\right )\right ) \]

input
Integrate[((d + I*c*d*x)*(a + b*ArcTan[c*x])^2)/x,x]
 
output
d*(I*a^2*c*x + a^2*Log[c*x] + I*a*b*(2*c*x*ArcTan[c*x] - Log[1 + c^2*x^2]) 
 + b^2*(ArcTan[c*x]*((1 + I*c*x)*ArcTan[c*x] + (2*I)*Log[1 + E^((2*I)*ArcT 
an[c*x])]) + PolyLog[2, -E^((2*I)*ArcTan[c*x])]) + I*a*b*(PolyLog[2, (-I)* 
c*x] - PolyLog[2, I*c*x]) + b^2*((-1/24*I)*Pi^3 + ((2*I)/3)*ArcTan[c*x]^3 
+ ArcTan[c*x]^2*Log[1 - E^((-2*I)*ArcTan[c*x])] - ArcTan[c*x]^2*Log[1 + E^ 
((2*I)*ArcTan[c*x])] + I*ArcTan[c*x]*PolyLog[2, E^((-2*I)*ArcTan[c*x])] + 
I*ArcTan[c*x]*PolyLog[2, -E^((2*I)*ArcTan[c*x])] + PolyLog[3, E^((-2*I)*Ar 
cTan[c*x])]/2 - PolyLog[3, -E^((2*I)*ArcTan[c*x])]/2))
 
3.1.72.3 Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {5411, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx\)

\(\Big \downarrow \) 5411

\(\displaystyle \int \left (\frac {d (a+b \arctan (c x))^2}{x}+i c d (a+b \arctan (c x))^2\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle 2 d \text {arctanh}\left (1-\frac {2}{1+i c x}\right ) (a+b \arctan (c x))^2-i b d \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right ) (a+b \arctan (c x))+i b d \operatorname {PolyLog}\left (2,\frac {2}{i c x+1}-1\right ) (a+b \arctan (c x))-d (a+b \arctan (c x))^2+i c d x (a+b \arctan (c x))^2+2 i b d \log \left (\frac {2}{1+i c x}\right ) (a+b \arctan (c x))+b^2 (-d) \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right )-\frac {1}{2} b^2 d \operatorname {PolyLog}\left (3,1-\frac {2}{i c x+1}\right )+\frac {1}{2} b^2 d \operatorname {PolyLog}\left (3,\frac {2}{i c x+1}-1\right )\)

input
Int[((d + I*c*d*x)*(a + b*ArcTan[c*x])^2)/x,x]
 
output
-(d*(a + b*ArcTan[c*x])^2) + I*c*d*x*(a + b*ArcTan[c*x])^2 + 2*d*(a + b*Ar 
cTan[c*x])^2*ArcTanh[1 - 2/(1 + I*c*x)] + (2*I)*b*d*(a + b*ArcTan[c*x])*Lo 
g[2/(1 + I*c*x)] - b^2*d*PolyLog[2, 1 - 2/(1 + I*c*x)] - I*b*d*(a + b*ArcT 
an[c*x])*PolyLog[2, 1 - 2/(1 + I*c*x)] + I*b*d*(a + b*ArcTan[c*x])*PolyLog 
[2, -1 + 2/(1 + I*c*x)] - (b^2*d*PolyLog[3, 1 - 2/(1 + I*c*x)])/2 + (b^2*d 
*PolyLog[3, -1 + 2/(1 + I*c*x)])/2
 

3.1.72.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5411
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* 
x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & 
& IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
3.1.72.4 Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 26.06 (sec) , antiderivative size = 3480, normalized size of antiderivative = 16.11

method result size
parts \(\text {Expression too large to display}\) \(3480\)
derivativedivides \(\text {Expression too large to display}\) \(3482\)
default \(\text {Expression too large to display}\) \(3482\)

input
int((d+I*c*d*x)*(a+b*arctan(c*x))^2/x,x,method=_RETURNVERBOSE)
 
output
a^2*d*(I*c*x+ln(x))+d*b^2*(-1/2*polylog(3,-(1+I*c*x)^2/(c^2*x^2+1))+2*poly 
log(3,(1+I*c*x)/(c^2*x^2+1)^(1/2))+2*polylog(3,-(1+I*c*x)/(c^2*x^2+1)^(1/2 
))+1/2*polylog(2,-(1+I*c*x)^2/(c^2*x^2+1))+arctan(c*x)^2+I*arctan(c*x)*pol 
ylog(2,-(1+I*c*x)^2/(c^2*x^2+1))+dilog(1+I*(1+I*c*x)/(c^2*x^2+1)^(1/2))+di 
log(1-I*(1+I*c*x)/(c^2*x^2+1)^(1/2))+I*arctan(c*x)*ln(1+I*(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2+1)^(1/2))+dilog(1+I*(1+I*c*x)/(c^2*x^2+1)^(1/2))+dilog(1-I*...
 
3.1.72.5 Fricas [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x} \,d x } \]

input
integrate((d+I*c*d*x)*(a+b*arctan(c*x))^2/x,x, algorithm="fricas")
 
output
integral(1/4*(4*I*a^2*c*d*x + 4*a^2*d + (-I*b^2*c*d*x - b^2*d)*log(-(c*x + 
 I)/(c*x - I))^2 - 4*(a*b*c*d*x - I*a*b*d)*log(-(c*x + I)/(c*x - I)))/x, x 
)
 
3.1.72.6 Sympy [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=i d \left (\int a^{2} c\, dx + \int \left (- \frac {i a^{2}}{x}\right )\, dx + \int b^{2} c \operatorname {atan}^{2}{\left (c x \right )}\, dx + \int \left (- \frac {i b^{2} \operatorname {atan}^{2}{\left (c x \right )}}{x}\right )\, dx + \int 2 a b c \operatorname {atan}{\left (c x \right )}\, dx + \int \left (- \frac {2 i a b \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx\right ) \]

input
integrate((d+I*c*d*x)*(a+b*atan(c*x))**2/x,x)
 
output
I*d*(Integral(a**2*c, x) + Integral(-I*a**2/x, x) + Integral(b**2*c*atan(c 
*x)**2, x) + Integral(-I*b**2*atan(c*x)**2/x, x) + Integral(2*a*b*c*atan(c 
*x), x) + Integral(-2*I*a*b*atan(c*x)/x, x))
 
3.1.72.7 Maxima [F]

\[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )} {\left (b \arctan \left (c x\right ) + a\right )}^{2}}{x} \,d x } \]

input
integrate((d+I*c*d*x)*(a+b*arctan(c*x))^2/x,x, algorithm="maxima")
 
output
1/4*I*b^2*c*d*x*arctan(c*x)^2 + 12*I*b^2*c^3*d*integrate(1/16*x^3*arctan(c 
*x)^2/(c^2*x^3 + x), x) + 4*b^2*c^3*d*integrate(1/16*x^3*arctan(c*x)*log(c 
^2*x^2 + 1)/(c^2*x^3 + x), x) + I*b^2*c^3*d*integrate(1/16*x^3*log(c^2*x^2 
 + 1)^2/(c^2*x^3 + x), x) + 8*b^2*c^3*d*integrate(1/16*x^3*arctan(c*x)/(c^ 
2*x^3 + x), x) + 4*I*b^2*c^3*d*integrate(1/16*x^3*log(c^2*x^2 + 1)/(c^2*x^ 
3 + x), x) - 1/4*b^2*c*d*x*arctan(c*x)*log(c^2*x^2 + 1) - 1/16*I*b^2*c*d*x 
*log(c^2*x^2 + 1)^2 + 1/4*I*b^2*d*arctan(c*x)^3 + 12*b^2*c^2*d*integrate(1 
/16*x^2*arctan(c*x)^2/(c^2*x^3 + x), x) - 4*I*b^2*c^2*d*integrate(1/16*x^2 
*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*x^3 + x), x) + 32*a*b*c^2*d*integrate(1 
/16*x^2*arctan(c*x)/(c^2*x^3 + x), x) - 8*I*b^2*c^2*d*integrate(1/16*x^2*a 
rctan(c*x)/(c^2*x^3 + x), x) + 1/96*b^2*d*log(c^2*x^2 + 1)^3 + I*a^2*c*d*x 
 + 4*b^2*c*d*integrate(1/16*x*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*x^3 + x), 
x) + I*b^2*c*d*integrate(1/16*x*log(c^2*x^2 + 1)^2/(c^2*x^3 + x), x) + 1/1 
6*b^2*d*log(c^2*x^2 + 1)^2 + I*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*a*b* 
d + 12*b^2*d*integrate(1/16*arctan(c*x)^2/(c^2*x^3 + x), x) - 4*I*b^2*d*in 
tegrate(1/16*arctan(c*x)*log(c^2*x^2 + 1)/(c^2*x^3 + x), x) + b^2*d*integr 
ate(1/16*log(c^2*x^2 + 1)^2/(c^2*x^3 + x), x) + 32*a*b*d*integrate(1/16*ar 
ctan(c*x)/(c^2*x^3 + x), x) + a^2*d*log(x)
 
3.1.72.8 Giac [F(-1)]

Timed out. \[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=\text {Timed out} \]

input
integrate((d+I*c*d*x)*(a+b*arctan(c*x))^2/x,x, algorithm="giac")
 
output
Timed out
 
3.1.72.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(d+i c d x) (a+b \arctan (c x))^2}{x} \, dx=\int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2\,\left (d+c\,d\,x\,1{}\mathrm {i}\right )}{x} \,d x \]

input
int(((a + b*atan(c*x))^2*(d + c*d*x*1i))/x,x)
 
output
int(((a + b*atan(c*x))^2*(d + c*d*x*1i))/x, x)